package com.xinsoft.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;

import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 等级价格
 *
 * @TableName sys_level_price_ref
 */
@TableName(value = "sys_level_price_ref")
@Data
public class SysLevelPriceRef implements Serializable {
    /**
     * 价格等级ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 客户等级ID
     */
    @NotNull(message = "请选择客户等级")
    private Integer levelId;

    /**
     * 物料ID
     */
    @NotNull(message = "请选择物料")
    private Integer materialId;

    /**
     * 销售价格
     */
    @NotNull(message = "请输入销售价格")
    @DecimalMin(value = "0",message = "销售价格不能低于0")
    private BigDecimal salePrice;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}